<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>条件渲染</title>
  </head>
  <body>
    <script src="https://unpkg.com/vue@next"></script>

    <div id="root"></div>

    <script>
      const app = Vue.createApp({
        data() {
          return {
              show:true,
              conditionOne:false,
              conditionTwo:false
          };
        },

        //template: `
        //        <div v-if="show">hello world</div>
        //        <div v-show="show">hello yunmu</div>
        //    `,
        template: `
                <div v-if="conditionOne">hello world</div>
                <div v-else-if="conditionTwo">hello zhongguo</div>
                <div v-else>hello yunmu</div>
            `,
      });

      const vm = app.mount("#root");

    </script>
  </body>
</html>
